function importExc(){
        var formData = new FormData();
        //检验导入的文件是否为Excel文件
        var uploadFile = $('#upfile').val();
        formData.append("upfile",$("#upfile")[0].files[0]);
        formData.append("name",uploadFile);
        if(uploadFile == null || uploadFile == ''){
            alert("请选择要上传的Excel文件");
            return false;
        }else{
            var fileExtend = uploadFile.substring(uploadFile.lastIndexOf('.')).toLowerCase();
            alert(fileExtend)
            if(fileExtend == '.xls' || fileExtend == '.xlsx'){
                $.ajax({
                    url:"ajaxUpload",
                    type:"POST",
                    data:formData,
                    processData:false,
                    contentType:false,
                    success:function (data) {
                        if (data == '1'){
                            alert("导入成功")
                        }else{
                            alert("导入失败")
                        }
                    }

                })
                return true
            }else{
                alert("文件格式需为.xls格式或者.xlsx格式");
                return false;
                //ajax提交excel

            }
        }

}
